/*
 *  SurfaceSuperEllipsoid.h
 *  EPPI-0.0
 *
 *  Created by Roberto Ortega on 18/04/11
 *
 */

 
#ifndef _surfacesuperellipsoid_h_
#define _surfacesuperellipsoid_h_

#include <iostream>
#include <fstream>
#include <sstream>
#include "commonutil.h"
#include "surface.h"

class SurfaceSuperEllipsoid : public Surface
{
	
	/* Data Members From the Base Class Surface
	 
	 string name;
	 
	 vector<vector<double> > vLocalPoints;
	 vector<vector<int> > vLocalElements;
	 vector<vector<double> > vContactPoints;
	 
	 int nLocalPoints;
	 int nLocalElements;
	 
	 string pointsOption;
	 string contactFileName;
	 
	 bool contactAllOption;
	 bool contactFileOption;	
	 
	 ifstream inContact;
	 */
	
	
public:
	
	//-- Local Data Members --//
	
	ofstream localFGraph;
	
	double rx;
	double ry;
	double rz;
	
	double aa;
	double bb;

	int nn;
	int mm;
	
public:
	
	SurfaceSuperEllipsoid();
	
	~SurfaceSuperEllipsoid();
	
	SurfaceSuperEllipsoid(ifstream &, const string &);
	
	//-- Local functions --//
	
	void createSuperEllipsoid(void);
	
	//-- Virtual functions --//
	
	double evalS(double&, double&, double&);
	
	Eigen::RowVector3d evaldS(double&, double&, double&);
	
	Eigen::Matrix3d evalddS(double&, double&, double&);
};

#endif